home *** CD-ROM | disk | FTP | other *** search
/ Aminet 48 / Aminet 48 (2002)(GTI - Schatztruhe)[!][Apr 2002].iso / Aminet / text / edit / vim60rt.lha / Vim / vim60 / syntax / rpcgen.vim < prev    next >
Encoding:
Text File  |  2001-05-10  |  2.0 KB  |  63 lines

  1. " Vim syntax file
  2. " Language:    rpcgen
  3. " Version:    5.4-1
  4. " Maintainer:    Dr. Charles E. Campbell, Jr. <Charles.E.Campbell.1@gsfc.nasa.gov>
  5. " Last Change:    April 23, 1999
  6.  
  7. " For version 5.x: Clear all syntax items
  8. " For version 6.x: Quit when a syntax file was already loaded
  9. if version < 600
  10.   syntax clear
  11. elseif exists("b:current_syntax")
  12.   finish
  13. endif
  14.  
  15. " Read the C syntax to start with
  16. if version < 600
  17.   source <sfile>:p:h/c.vim
  18. else
  19.   runtime! syntax/c.vim
  20. endif
  21.  
  22. syn keyword rpcProgram    program                skipnl skipwhite nextgroup=rpcProgName
  23. syn match   rpcProgName    contained    "\<\i\I*\>"    skipnl skipwhite nextgroup=rpcProgZone
  24. syn region  rpcProgZone    contained    matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\(\d\+\|0x[23]\x\{7}\)\s*;"me=e-1 contains=rpcVersion,cComment,rpcProgNmbrErr
  25. syn keyword rpcVersion    contained    version        skipnl skipwhite nextgroup=rpcVersName
  26. syn match   rpcVersName    contained    "\<\i\I*\>"    skipnl skipwhite nextgroup=rpcVersZone
  27. syn region  rpcVersZone    contained    matchgroup=Delimiter start="{" matchgroup=Delimiter end="}\s*=\s*\d\+\s*;"me=e-1 contains=cType,cStructure,cStorageClass,rpcDecl,rpcProcNmbr,cComment
  28. syn keyword rpcDecl    contained    string
  29. syn match   rpcProcNmbr    contained    "=\s*\d\+;"me=e-1
  30. syn match   rpcProgNmbrErr contained    "=\s*0x[^23]\x*"ms=s+1
  31. syn match   rpcPassThru            "^\s*%.*$"
  32.  
  33. " Define the default highlighting.
  34. " For version 5.7 and earlier: only when not done already
  35. " For version 5.8 and later: only when an item doesn't have highlighting yet
  36. if version >= 508 || !exists("did_rpcgen_syntax_inits")
  37.   if version < 508
  38.     let did_rpcgen_syntax_inits = 1
  39.     command -nargs=+ HiLink hi link <args>
  40.   else
  41.     command -nargs=+ HiLink hi def link <args>
  42.   endif
  43.  
  44.   HiLink rpcProgName    rpcName
  45.   HiLink rpcProgram    rpcStatement
  46.   HiLink rpcVersName    rpcName
  47.   HiLink rpcVersion    rpcStatement
  48.  
  49.   HiLink rpcDecl    cType
  50.   HiLink rpcPassThru    cComment
  51.  
  52.   HiLink rpcName    Special
  53.   HiLink rpcProcNmbr    Delimiter
  54.   HiLink rpcProgNmbrErr    Error
  55.   HiLink rpcStatement    Statement
  56.  
  57.   delcommand HiLink
  58. endif
  59.  
  60. let b:current_syntax = "rpcgen"
  61.  
  62. " vim: ts=8
  63.